<?php
require_once('config.php');

$id=$_GET['id'];


$sql="select * from userinfo where id='$id'";

$result=mysqli_query($conn,$sql);

$data=mysqli_fetch_array($result);

// echo json_encode($data);

$obj=array();

if(!$data){//
$obj['code']=0;
$obj['msg']='用户不存在';

}else{
    $obj['code']=1;
    $obj['data']['username']=$data['username'];
    $obj['data']['telephone']=$data['telephone'];
    $obj['data']['password']=$data['password'];
    // $obj['data']=true;
}

echo json_encode($obj);



